<?php

class Model_LibraryAcl extends Zend_Acl {

    public function __construct() {
        $this->addRole(new Zend_Acl_Role('user'))
             ->addRole(new Zend_Acl_Role('admin'), 'user');

        $this->add(new Zend_Acl_Resource('authentication'))
        ->add(new Zend_Acl_Resource('stats'))
        ->add(new Zend_Acl_Resource('visiteur'))
        ->add(new Zend_Acl_Resource('error'))
        ->add(new Zend_Acl_Resource('index'))
        ->add(new Zend_Acl_Resource('frais'));

        $this->allow('user', 'authentication')
        ->allow('user', 'visiteur', 'lister')
        ->allow('user', 'frais', 'lister');

        $this->allow('admin', 'stats')
        ->allow('admin', 'frais')
        ->allow('admin', 'visiteur')
        ->allow('admin', 'error');
    }

}

?>
